How can I take the operands in an equation within a string and reapply them to the changed equation